package com.xiaoy.core.database.entity;

import java.util.HashMap;
import java.util.Map;

public enum DataTableColumnType {
	VARCHAR2,DATE,NUMBER;
	
//	public static String VARCHAR2 = "varchar2";
//	public static String DATE = "date";
//	public static String NUMBER = "number";
	
	private static Map<DataTableColumnType, String> values = new HashMap<DataTableColumnType, String>();
	private static Map<DataTableColumnType, String> mappingObject = new HashMap<DataTableColumnType, String>();
	
	
	static {
		values.put(DataTableColumnType.VARCHAR2, "255");
		values.put(DataTableColumnType.NUMBER, "20");
		
		
		mappingObject.put(DataTableColumnType.VARCHAR2, "String");
		mappingObject.put(DataTableColumnType.NUMBER, "Long");
		mappingObject.put(DataTableColumnType.DATE, "Date");
	}
	
	public static String getMappingObject (DataTableColumnType type) {
		return mappingObject.get(type);
	}
	
	public static String getDefaultLenth (DataTableColumnType type) {
		return values.get(type);
	}
}
